public class HomeWork11_06{
    public static void main(String[] args){
        int[] arr = new int[]{1, 2, 3, 4, 5};
        ArrAns.arrAnsToIndex(arr, 0);
        System.out.println(arr[0]);
    }
}

class ArrAns{
    public static void arrAnsToIndex(int[] arr, int index){
        for(int i = 1; i < arr.length; i++){
            arr[index] += arr[i];
        }
    }
}